<!DOCTYPE html>
<html lang="en">
<head>
    <meta charset="UTF-8">
    <title>Title</title>
</head>
<body>
    <a href="http://www.baidu.com" onclick="return check()">点击跳转</a>
    <script type="text/javascript">
        function check() {
            // alert(1234);//先检查是否进入该函数
            var result = confirm("你确定不跳转到百度页面？");
            if(result){
                return false;


            }
        }
        
    </script>

</body>
</html>